package org.tailor
/**
 * The Comment entity.
 *
 * @author    
 *
 *
 */
class Comment {
    static mapping = {
         table 'comment'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         id generator:'identity', column:'id'
         designIdDesign column:'design_id'
         clientIdClient column:'client_id'
         regionIdRegions column:'region_id'
    }
    Long id
    Boolean commentApproved
    Date commentDate
    String description
    // Relation
//    Design designIdDesign
    // Relation
    Client clientIdClient
    // Relation
    Regions regionIdRegions

    static constraints = {
        id(max: 9223372036854775807L)
        commentApproved()
        commentDate()
        description(size: 1..255, blank: false)
//        designIdDesign()
        clientIdClient()
        regionIdRegions()
    }
    String toString() {
        return "${id}" 
    }
}

